/*
 * SDLUtils.h
 *
 *  Created on: 23/05/2014
 *      Author: javier
 */

#ifndef SDLUTILS_H_
#define SDLUTILS_H_

#include <iostream>
#include <SDL2/SDL.h>
#include <utility> // std::pair

class SDLUtils {
public:
	SDLUtils();
	static void logSDLError(std::ostream &os, const std::string &msg);
	static SDL_Texture* loadTexture(const std::string &file, SDL_Renderer *ren);
	static void renderTexture(SDL_Texture *tex, SDL_Renderer *ren, SDL_Rect *dst,
			SDL_Rect *clip = NULL);
	static void renderTexture(SDL_Texture *tex, SDL_Renderer *ren, int x,
			int y, SDL_Rect *clip = NULL);
	static std::pair<int, int> queryImageSize(SDL_Texture *image);
	virtual ~SDLUtils();
};

#endif /* SDLUTILS_H_ */
